home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: malloc
- Date: Tue, 06 Feb 96 13:12:33 GMT
- Organization: none
- Message-ID: <823612353snz@genesis.demon.co.uk>
- References: <311694DC.23905C8@traffic.jam.net>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <311694DC.23905C8@traffic.jam.net>
- dshaffer@traffic.jam.net "David Shaffer" writes:
-
- >why does malloc itself give a sigsegv?
-
- It can do so if you have corrupted its workspace. This can be done through
- some invalid pointer operation e.g. dereferencing an inititialised pointer,
- writing outside the bounds of an object (in this case most likely one
- allocated previosly from the heap), or attempting to free an object not
- allocated by malloc/calloc/realloc or one already freed.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-